---
// 定义网站数据
const websites = [
    {
        id: 1,
        name: "壹加贰聚合登录",
        desc: "壹加贰聚合登录是...",
        icon: "https://example.com/icons/1.png",
    },
    {
        id: 2,
        name: "小艾云IDC",
        desc: "小艾云IDC云计算...",
        icon: "https://example.com/icons/2.png",
    },
    {
        id: 3,
        name: "蛮牛云",
        desc: "蛮牛云计算为企业...",
        icon: "https://example.com/icons/3.png",
    },
    {
        id: 4,
        name: "Gophp",
        desc: "Gophp是一家专注...",
        icon: "https://example.com/icons/4.png",
    },
    {
        id: 5,
        name: "Nicetheme",
        desc: "国内专业的WordPr...",
        icon: "https://example.com/icons/5.png",
    },
    {
        id: 6,
        name: "苏酷伊",
        desc: "基于内容分享技术...",
        icon: "https://example.com/icons/6.png",
    },
    {
        id: 7,
        name: "DaxPay",
        desc: "DaxPay是一套开...",
        icon: "https://example.com/icons/7.png",
    },
    {
        id: 8,
        name: "极玩数据IDC",
        desc: "极玩数据IDC新一...",
        icon: "https://example.com/icons/8.png",
    },
    {
        id: 9,
        name: "江海博客",
        desc: "江海博客是为用户...",
        icon: "https://example.com/icons/9.png",
    },
    {
        id: 10,
        name: "刀客在线工具",
        desc: "刀客在线工具是一...",
        icon: "https://example.com/icons/10.png",
    },
    {
        id: 11,
        name: "酷兔云",
        desc: "酷兔云提供专业的...",
        icon: "https://example.com/icons/11.png",
    },
    {
        id: 12,
        name: "发卡网搭建",
        desc: "发卡网搭建，出售...",
        icon: "https://example.com/icons/12.png",
    },
    {
        id: 13,
        name: "零九CDN",
        desc: "FastCDN提供全球...",
        icon: "https://example.com/icons/13.png",
    },
    {
        id: 14,
        name: "域名网址导航",
        desc: "EaseName.com 是...",
        icon: "https://example.com/icons/14.png",
    },
    {
        id: 15,
        name: "豆包",
        desc: "豆包是你的 AI 聊...",
        icon: "https://example.com/icons/15.png",
    },
    {
        id: 16,
        name: "轻松云",
        desc: "轻松云-国内外云服...",
        icon: "https://example.com/icons/16.png",
    },
    {
        id: 17,
        name: "域名防红系统",
        desc: "域名防红系统，防...",
        icon: "https://example.com/icons/17.png",
    },
    {
        id: 18,
        name: "久久权益商城",
        desc: "久久权益提供1000...",
        icon: "https://example.com/icons/18.png",
    },
    {
        id: 19,
        name: "爱兔付",
        desc: "爱兔付，扫码支付...",
        icon: "https://example.com/icons/19.png",
    },
    {
        id: 20,
        name: "RStack",
        desc: "RStack锐栈科技致...",
        icon: "https://example.com/icons/20.png",
    },
    {
        id: 21,
        name: "小鸟云",
        desc: "小鸟云是国内领先...",
        icon: "https://example.com/icons/21.png",
    },
    {
        id: 22,
        name: "极光互联",
        desc: "极光互联,致力于站...",
        icon: "https://example.com/icons/22.png",
    },
    {
        id: 23,
        name: "SN发卡网自动...",
        desc: "SN自动发卡网是一...",
        icon: "https://example.com/icons/23.png",
    },
    {
        id: 24,
        name: "慈云数据",
        desc: "慈云数据为企业...",
        icon: "https://example.com/icons/24.png",
    },
];
---

<div class="container mx-auto px-4 py-6">
    <h2 class="text-xl font-bold text-gray-800 dark:text-white mb-6">
        热门网址
    </h2>
    <!-- 网站卡片网格 -->
    <div
        class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-4"
    >
        {
            websites.map((site) => (
                <div
                    data-tooltip-target={site.id + "-yo"}
                    data-tooltip-placement="bottom"
                    class="bg-white group dark:bg-gray-800 rounded-lg shadow-sm p-2 flex flex-col space-y-2 hover:shadow-md transition-shadow duration-200 border border-gray-100 dark:border-gray-700"
                >
                    <div class="flex items-center space-x-2">
                        <img
                            src="/nice/static/images/thumbs/1.jpg"
                            alt={site.name}
                            class="w-8 h-8 rounded-full group-hover:scale-125"
                        />
                        <div class="flex flex-col">
                            <h3 class="text-base font-medium text-gray-900 dark:text-white line-clamp-1 group-hover:text-red-500">
                                {site.name}
                            </h3>
                            <p class="text-sm text-gray-500 dark:text-gray-400 line-clamp-1">
                                {site.desc}
                            </p>
                        </div>
                    </div>
                    <div class="text-center flex justify-center">
                        <span class="flex bg-green-100  text-green-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded-sm dark:bg-gray-700 dark:text-green-400 border border-green-400">
                            <svg
                        xmlns="http://www.w3.org/2000/svg"
                        fill="none"
                        viewBox="0 0 24 24"
                        stroke-width="1.5"
                        stroke="currentColor"
                        class="size-4"
                    >
                        <path
                            stroke-linecap="round"
                            stroke-linejoin="round"
                            d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"
                        ></path>
                        <path
                            stroke-linecap="round"
                            stroke-linejoin="round"
                            d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"></path>
                    </svg>
                    <span class="pl-1">0</span>
                        </span>
                        <span class="bg-yellow-100 text-yellow-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded-sm dark:bg-gray-700 dark:text-yellow-300 border border-yellow-300">
                            Yellow
                        </span>
                    </div>
                    <div
                        id={site.id + "-yo"}
                        class="absolute px-2 invisible z-10 inline-block  text-left text-sm font-medium text-zinc-300 bg-slate-950 border border-gray-200 rounded-lg shadow-sm opacity-0 tooltip"
                        role="tooltip"
                    >
                        Tooltip content
                        <div class="tooltip-arrow" data-popper-arrow />
                    </div>
                </div>
            ))
        }
    </div>
</div>

